//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#ifndef _MatrixTool_h__
#define	_MatrixTool_h__
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#include "libraries.h"
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
class MatrixTool {
  
  private:
    
    String*           filenameMatrix;
    
    double**          matrix;
    TListE <String>*  labels;
  
  protected:
    
  public:
    
    MatrixTool();
    MatrixTool(String*);
    MatrixTool(char*);
    MatrixTool(const char*);
    MatrixTool(const MatrixTool*);
    
    ~MatrixTool();
    
    void              FilenameMatrix(String*);
    void              Matrix(double**, long);
    void              Labels(TListE <String>*);
    
    String*           FilenameMatrix(void);
    double**          Matrix(void);
    TListE <String>*  Labels(void);   
    
    bool              ReadFile(void);
    bool              ReadFromString(TListE <String>*, String*);
    bool              ReadFromString(TListE <String>*, char*);
    
    bool              GetSubMatrix(long, long, double**);
    char*             GetSubMatrix(long, long);
    
    bool              GetSubMatrix(TListE <String>*, double**);
    char*             GetSubMatrix(TListE <String>*);
    
    bool              ValuePosition(String*, String*, double&);
  
    bool              SplitColumn(char*, TListE <String>*, char*);
    bool              SplitColumn(char*, TListE <String>*, const char*);
    
};
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#endif
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
